package com.mju.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.mju.pojo.Receive;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpSession;
import java.math.BigDecimal;
import java.util.Date;

/**
* @author LX
* @description 针对表【t_receive】的数据库操作Service
* @createDate 2023-10-24 10:47:54
*/
public interface IReceiveService{

    /**
     * 添加回收信息
     * @param receive
     * @return
     */
    Boolean addReceiveInfo(Receive receive);

    /**
     * 审核回收单
     * @param rid
     * @param finalPrice
     * @return
     */
    Boolean reviewReceiveInfo(Integer rid, BigDecimal finalPrice);

    /**
     * 上门回收
     * @param rid
     * @param predictTimeStart
     * @param predictTimeEnd
     * @return
     */
    Boolean faceToFaceReceive(Integer rid, Date predictTimeStart, Date predictTimeEnd);

    /**
     * 回收单完成
     * @param rid
     * @return
     */
    Boolean completeReceive(Integer rid);

    /**
     * 已取货，待打款
     * @param rid
     * @return
     */
    Boolean waitingForPayment(Integer rid);

    /**
     * 获取回收单状态
     *
     * @param rid
     * @return
     */
    Integer getStatusByRid(Integer rid);

    /**
     * 取消回收单
     * @param rid
     * @return
     */
    Boolean cancelReceive(Integer rid);

    /**
     * 用户确认回收
     * @param rid
     * @return
     */
    Boolean userConfirmsReceive(Integer rid);

    /**
     * 修改回收单信息
     * @param receive
     * @return
     */
    Receive updateReceiveInfo(Receive receive);

    /**
     * 修改回收单状态
     * @param rid
     * @param status
     * @return
     */
    Boolean updateStatusByRid(Integer rid,Integer status);

    /**
     * 修改回收人员
     * @param rid
     * @param repoMan
     * @return
     */
    Boolean updateRepoManByRid(Integer rid,String repoMan);

    /**
     * 删除回收单
     * @param rid
     * @return
     */
    Boolean deleteReceiveInfo(Integer rid);

    /**
     * 上传图片
     *
     * @param session
     * @param file
     * @return
     */
    String uploadPictures(HttpSession session, MultipartFile file);

    /**
     * 查询所有回收单信息
     * @param currentPage
     * @param pageSize
     * @return
     */
    IPage<Receive> queryAllReceiveInfo(Integer currentPage, Integer pageSize);

    /**
     * 条件查询所有回收单信息(条件：回收单id、用户id、模糊用户名、回收单状态)
     * @param currentPage
     * @param pageSize
     * @param receive
     * @return
     */
    IPage<Receive> conQueryAllReceiveInfo(Integer currentPage, Integer pageSize,Receive receive);
}
